/**
 * 
 */
package com.sduept.nwld.mobile.manager.fault;

import com.sduept.core.dao.SuperDAO;
import com.sduept.nwld.mobile.model.fault.FaultCharacteristicInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**    
 *  
 * Simple to Introduction  
 *  
 * @Description:  [故障前后的电压、电流变化值、差动电流]   
 * @Author:       [lixz]   
 * @CreateDate:   [2019年6月17日 下午6:34:15]   
 *  
 *    
 */
@Service
public class FaultCharacteristicInfoManager {
	@Autowired
	private SuperDAO dao;
	/**
	 * 根据变电站ID、故障文件ID、数据类型来查找故障前后的电压电流变化值、差动电流。
	 * @param station_id 变电站id
	 * @param faultId 故障id
	 * @param electrical_type 数据类型：1：电压，2：电流，3：差动电流
	 * @return
	 */
	public List<FaultCharacteristicInfo> getFaultCharacteristicInfoByCondition(String station_id,String faultId,String electrical_type) {		
		String[] whereArgs =  new String[3];
		whereArgs[0] = station_id;
		whereArgs[1] = faultId;
		whereArgs[2] = electrical_type;
		List<FaultCharacteristicInfo> faultCharacteristicInfoList = dao.findByCondition("station_id=?1 and fault_record_id=?2 and electrical_type=?3", whereArgs, FaultCharacteristicInfo.class);
	    return faultCharacteristicInfoList;
	}
}
